# -*- coding: utf-8 -*-

import os


def file_name(file_dir):
    L = []
    for root, dirs, files in os.walk(file_dir):
        for file in files:
            L.append(file)
    return L
if __name__ == '__main__':
    f = open('/Users/jiangce/Desktop/train/test','w')
    for i in file_name('/Users/jiangce/Desktop/01'):
        f.write(i)
        f.write('\n')
    f.close()
print(len(open(r"/Users/jiangce/Desktop/test.txt",'rU').readlines()))